<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<title>新增素材</title>
	<link rel="stylesheet" href="/layui/css/layui.css">
	<link rel="stylesheet" href="/fission/css/iconfont.css">
	<style type="text/css">
		body{
			background: #e9e9e9;
		}
		/*公共头部带搜索*/
		.public_container{
			margin: 20px;
			background: #fff;
		}
		.public_title_container{
			height: 54px;
			padding: 0 20px;
			font-size: 14px;
			display: flex;
			align-items: center;
			background: #f9f9f9;
			border-bottom: 1px solid #f0f0f0;
			justify-content: space-between;
		}
		.public_title_container a{
			fill: #999;
		}
		/*公共表单部分*/
		.public_form_container{
			padding: 20px 20px 40px 20px;
		}
		.public_form_content{
			padding: 24px 40px 24px 0;
			background: #fff;
			border: 1px solid #e9e9e9;
			margin-bottom: 8px;
		}
		.public_form_List{
			margin-bottom: 10px;
		}
		.public_form_List:last-child{
			margin-bottom: 0px;
		}
		.public_formTitle_container lable{
			font-size: 13px;
			font-weight: bold;
		}
		.service-card {
		  padding: 0 7px;
		  color: rgba(0,0,0,.65);
		  line-height: 28px;
		  font-size: 13px;
		  display: inline-block;
		  margin: 0 8px 0 5px;
		  -webkit-box-sizing: border-box;
		  box-sizing: border-box;
		  white-space: nowrap;
		  background: #fafafa;
		  border: 1px solid #e9e9e9;
		  border-radius: 4px;
		  position: relative;
		}
		.service-card i {
		  font-size: 14px;
		  display: inline-block;
		  color: #7da3d1;
		  margin-right: 2px;
		}
		.service-card .close {
		  position: absolute;
		  top: -13px;
		  right: -8px;
		  opacity: .6;
		  cursor: pointer;
		}
		.service-card .close:hover {
		  opacity: 1;
		}
		.layui-form-label {
		  padding:3px 11px;
		}
	</style>
</head>
<body>
	<form class="layui-form" id="form1">
		

		<div class="public_container">
			<!-- /*公共头部带搜索*/ -->
			<div class="public_content">
				<div class="public_title_container">
					<p>商品下单</p>
				</div>

			</div>
			<!-- /*公共头部带搜索*/ end -->
			<!-- 公共表单部分 -->
			<div class="public_form_container">
				<div class="public_form_content">
					<div class="public_form_List publicHide_content" id="" style="display: block;">

						<div class="public_form_List">
							<div class="public_formTitle_container">
								<lable class="layui-form-label">商品名称：</lable>
							</div>
							<div class="public_formOther_container">
								<div class="layui-input-block">
									<input type="text"  readonly  value="{$product->goods_name}" autocomplete="off" class="layui-input">
								</div>
							</div>
						</div>
					</div>
					<div class="public_form_List publicHide_content" style="display: block;">

						<div class="public_form_List">
							<div class="public_formTitle_container">
								<lable class="layui-form-label">购买数量：</lable>
							</div>
							<div class="public_formOther_container">
								<div class="layui-input-block">
									<input type="text" readonly  value="1" autocomplete="off" class="layui-input">
								</div>
							</div>
						</div>
					</div>
					<div class="public_form_List publicHide_content" style="display: block;">

						<div class="public_form_List">
							<div class="public_formTitle_container">
								<lable class="layui-form-label">单价：</lable>
							</div>
							<div class="public_formOther_container">
								<div class="layui-input-block">
									<input type="text" readonly  value="{$product->unified_selling == '0.00' ?  $product->price :  $product->unified_selling}  ￥" autocomplete="off" class="layui-input">
								</div>
							</div>
						</div>
					</div>
					{if count($product->param) > 0}
						{loop $product->param as $param}
							<div class="public_form_List publicHide_content" style="display: block;">
								<div class="public_form_List">
									<div class="public_formTitle_container">
										<lable class="layui-form-label">{$param['desc']}：</lable>
									</div>
									<div class="public_formOther_container">
										<div class="layui-input-block">
											<input type="text" name="{$param['name']}" value="" placeholder="{$param['desc']}" autocomplete="off" class="layui-input">
										</div>
									</div>
								</div>
							</div>
						{/loop}
					{/if}
					


				<div class="layui-form-item">
					<div class="layui-input-block">
						<button type="button" class="layui-btn" lay-submit lay-filter="sendSms">下单</button>
						<!--<button type="reset" class="layui-btn layui-btn-primary">重置</button>-->
					</div>
				</div>
			</div>
		</div>
	</form>
	<script src="/cdn/jquery.js"></script>
	<script src="/layui/layui.js"></script>
	<script src="/js/ajax.js"></script>
	<script type="text/javascript">
		// 日期
		layui.use('laydate', function(){
		  var laydate = layui.laydate;
		  
		  laydate.render({ 
		    elem: '#timedTime'
		    ,type: 'datetime'
		    ,min: 0
		    ,max: 7
		  });
		});
		// 弹窗
		layui.use('layer', function(){
		  var layer = layui.layer;
		}); 
		// 表单
		layui.use('form', function(){
		  var form = layui.form;
		  
		  //监听提交
		  form.on('submit(sendSms)', function(data){
			var formData = $('#form1').serialize();	
			myAjaxPost(false, true, '', formData, function (resp) {
				console.log(resp);
				if (resp.status == 'success') {
					layer.msg(resp.msg);
					setTimeout(function(){
						location.reload();
					},1000);
				}else{
					alert(resp.msg);
				}
			});
		  });
		
		});
	</script>
	<script type="text/javascript">
		
	</script>
</body>
</html>